package usf.gwt.ui.bootstrap.client;

import usf.gwt.ui.bootstrap.client.core.BootstrapAttach;
import usf.gwt.ui.bootstrap.client.core.BootstrapWidget;

import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.HasText;

public class Badge extends BootstrapWidget implements HasText, BootstrapAttach {

	@Override
	protected Element initWidget() {
		return Document.get().createSpanElement();
	}
	@Override
	protected void initStyle() {
		getElement().addClassName("badge");
	}
	
	@Override
	public String getText() {
		return getElement().getInnerText();
	}
	@Override
	public void setText(String text) {
		getElement().setInnerText(text);
	}

}
